package com.kysd.base;

import java.io.Serializable;

/**
 * 返回类
 * @author liangjinquan
 *
 * @param <T>
 */
public class ApiModel<T> implements Serializable {

	private static final long serialVersionUID = -9080704750926360711L;
	private Integer status;
	private String errorMsg;
	private T body;
	
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public String getErrorMsg() {
		return errorMsg;
	}
	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}
	public T getBody() {
		return body;
	}
	public void setBody(T body) {
		this.body = body;
	}
	
	@Override
	public String toString() {
		return "ApiModel [status=" + status + ", errorMsg=" + errorMsg
				+ ", body=" + body + "]";
	}
	
	public ApiModel(Integer status, String errorMsg) {
		this(status, errorMsg, null);
	}
	
	public ApiModel(Integer status, String errorMsg, T body) {
		this.status = status;
		this.errorMsg = errorMsg;
		this.body = body;
	}
}
